package org.dromara.hm.domain.bo;

import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.hm.domain.HmProduct;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 产品信息业务对象 hm_product
 *
 * @author zy Hu
 * @date 2024-12-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HmProduct.class, reverseConvertGenerate = false)
public class HmProductBo extends BaseEntity {

    /**
     * 产品id
     */
    @NotNull(message = "产品id不能为空", groups = { EditGroup.class })
    private Long productId;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 产品规格
     */
    @NotBlank(message = "产品规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private String specifications;

    /**
     * 产品类型
     */
//    @NotBlank(message = "产品类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productType;


    /**
     * 是否为商品产品
     */
    private Boolean isCommercialProduct;

    /**
     * 是否为赠品产品
     */
    private Boolean isGiftProduct;

    /**
     * 上架时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date listingTime;

    /**
     * 上架时间转换
     */
    private String listingTimeStr;

    /**
     * 购买政策
     */
    @NotBlank(message = "购买政策不能为空", groups = { AddGroup.class, EditGroup.class })
    private String purchasePolicy;

    /**
     * 售卖店铺
     */
    private String shopSale;

    /**
     * 售卖店铺名称
     */
    private String shopSaleDesc;

    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;


}
